$("body").onbeforeunload(function () {
    alert("我好牛逼啊");
    $.ajax({
        url:"/merchantController/updateMerchantIsOnlineAfterExit",
        data:{},
        dataType:"json",
        type:"POST",
        success:function(data){
            console.log(data.message)
        },
        error:function(){
            alert("关闭浏览器时错误！");
        }
    })

});